<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <?php include_once MvcReg::$_moduleName . '/views/layout/head.php'; ?>
</head>
<body>
<?php include_once MvcReg::$_moduleName . '/views/layout/woody-prompt.php'; ?>
<?php include_once MvcReg::$_moduleName . '/views/layout/header.php'; ?>
<div id="main">
    <div class="container-fluid">
        <div class="row">
            <div class="col-md-2">
                <?php include_once MvcReg::$_moduleName . '/views/layout/left_menu.php'; ?>
            </div>
            <div class="col-md-10">
                <div class="right-content">
                    <h3>
                        <ol class="breadcrumb">
                            <li><a href="?md=manage&cl=index&at=hybrislog"><i class="fa fa-dashboard"></i><?php echo $menu["breadcrumb_current"] ?></a></li>
                        </ol>
                    </h3>

                    <br>
                    <form name="mainform" action="" method="get">
                        <?php echo $hidden_data?>
                        <div class="table-responsive">
                            <div class="panel panel-default">
                                <div class="panel-body form-inline">
                                    <a href="<?php echo $this_url?>add" class="btn btn-primary btn-add floatright"><span
                                                class="glyphicon glyphicon-plus"></span>新增</a>
                                </div>
                            </div>
                            <table class="table table-hover">
                                <thead>
                                <tr class="info">
                                    <th>序</th>
                                    <th>消息标题</th>
                                    <th>内容</th>
                                    <th>状态</th>
                                    <th>功能</th>
                                </tr>
                                </thead>
                                <tbody>
                                <?php
                                $n = 0;
                                foreach ($rsp_list as $k => $row) {
                                    $n++;
                                    $item = $n + ($page - 1) * $number_page;
                                    $id = $row["id"];
                                    if($row['status'] == 1){
                                        $statu = '启用';
                                        $statuBtn = '禁用';
                                    }else{
                                        $statu = '禁用';
                                        $statuBtn = '启用';
                                    }
                                    ?>
                                    <tr data-id="<?php echo $id?>">
                                        <td><?php echo $item ?></td>
                                        <td><?php echo $row['title'] ?></td>
                                        <td><?php echo $row['text'] ?></td>
                                        <td><?php echo $statu ?></td>
                                        <td>
                                            <?php if($row['riders_tel']){
                                                $IsHidden = 'style="display:none"';
                                                $IsShow = '';
                                            }else{
                                                $IsHidden = '';
                                                $IsShow = 'style="display:none"';
                                            }?>

                                            <input name="input" <?php echo $IsShow?> value="查看" onclick="edit('<?php echo $id; ?>', '<?php echo $page; ?>','<?php echo $this_url?>add')" type="button" class="btn btn-success btn-sm"/>
                                            <input name="input" <?php echo $IsHidden?> value="%{MODIFY}%" onclick="edit('<?php echo $id; ?>', '<?php echo $page; ?>','<?php echo $this_url?>add')" type="button" class="btn btn-success btn-sm"/>
                                            <input name="input" <?php echo $IsHidden?>  value="<?php echo $statuBtn?> " onclick="changeStatus('<?php echo $id; ?>', '<?php echo $page; ?>','<?php echo $this_url?>')"type="button" class="btn btn-success btn-sm"/>
                                            <input name="input" <?php echo $IsHidden?>  value="%{DEL}%" onclick="del('<?php echo $id; ?>', '<?php echo $this_url?>')"type="button" class="btn btn-success btn-sm"/>
                                        </td>
                                    </tr>
                                <?php } ?>
                                </tbody>
                            </table>
                            <div class="page">
                                <div class="pagination pull-left">共<?php echo $total_count ?>笔记录</div>
                                <?php if (!empty($rsp_page_list)) echo $rsp_page_list; ?>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<?php include_once MvcReg::$_moduleName . '/views/layout/footer.php'; ?>
</body>
</html>
